﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvisoryDetail.ascx.cs" Inherits="Sites_ThanhDuy_Webparts_Common_AdvisoryDetail" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.CommonPage" %>
<%
if (_Menu != null && _Content != null)
{ %>
<div class="page-content">
    <h1 class="content-title"><%=Server.HtmlEncode(_Content.Header) %></h1>
    <div class="rel oh date-line">
        <span class="date">Ngày đăng: <%=_Content.InsertDate.ToString("dd/MM/yyyy") %></span>
        <span class="social-group">
            <a class="fb" target="_blank" href="http://www.facebook.com/sharer.php?u=<%=Server.UrlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè trên Facebook"></a>
            <a class="tw" target="_blank" href="http://twitter.com/share?text=<%=Server.UrlEncode(this._Content.Header) %>&url=<%=Server.UrlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè trên Tweet"></a>
            <a class="gp" target="_blank" href="#"></a>
            <a class="print" href="#" onclick="window.print(); return false;"></a>
            <a class="email" href="mailto:?subject=<%=Server.HtmlEncode(this._Content.Header) %>&body=<%=Server.HtmlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè qua email"></a>
        </span>
    </div>
    <div class="content-des"><%=Server.HtmlEncode(_Content.Description) %></div>
    <h2 class="more-advisory">Trả lời</h2>
    <div class="content-detail">
        <%=this._Content.Content %>
    </div>
    <div class="line"></div>
    <div class="more-news">
        <h2>Các tin khác</h2>
        <ul><%
        if (_List != null)
        {
            string imagePath = "/" + Constant.UPLOAD_FILE_PATH + "commonpage/";
            foreach (DataRow row in _List.Rows)
            {
                int id = (int)row[CommonPageContent.ID__COLUMN_NAME];
                int menuID = (int)row[CommonPageContent.MENUID__COLUMN_NAME];
                string menuPath = row["MenuPath"].ToString() + CommonMenu.MENUPATH_SEPARATOR + menuID.ToString();
                string header = row[CommonPageContent.HEADER__COLUMN_NAME].ToString();
                string description = row[CommonPageContent.DESCRIPTION__COLUMN_NAME].ToString();
                string urlHeader = row[CommonPageContent.URLHEADER__COLUMN_NAME].ToString();
                string href = this.GetURL(menuPath, id, urlHeader);
    %>
            <li><a href="<%=href %>"><%=Server.HtmlEncode(description)%></a></li><%
            }
        }
    %>
        </ul>
    </div>
</div>
<%
} %>